<template lang="html">
  <div class="global">
    <div class="header">
      <image src="http://fanglilai-pic.oss-cn-shenzhen.aliyuncs.com/mw690/20180605/2018060511253627483.jpg"></image>
    </div>
    <div class='content'>
      <div class='section'>
        <div v-for="item in managerList" :key="item.id">
          <div class='item' @click="toProperty(item.id)">
            <image :src="item.src"></image>
            <text class='text'>{{item.title}}</text>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      managerList: [{
        id: 'contract',
        title: '我的合同',
        src: 'http://fanglilai-pic.oss-cn-shenzhen.aliyuncs.com/mw690/20180519/2018051904322621258.jpg'
      }, {
        id: 'bill',
        title: '我的账单',
        src: 'http://fanglilai-pic.oss-cn-shenzhen.aliyuncs.com/mw690/20180519/2018051904352392559.jpg'
      }, {
        id: 'energy',
        title: '水电表',
        src: 'http://fanglilai-pic.oss-cn-shenzhen.aliyuncs.com/mw690/20180519/2018051904451068104.jpg'
      }, {
        id: 'meeting',
        title: '场地',
        src: 'http://fanglilai-pic.oss-cn-shenzhen.aliyuncs.com/mw690/20180519/2018051904491097765.jpg'
      }]
    }
  },
  methods: {
    toProperty (id) {
      switch (id) {
        case 'contract':
          this.$router.push({ path: '/pages/contract/contract_overview/main' })
          break
        case 'bill':
          this.$router.push({ path: '/pages/bill/bill_overview/main' })
          break
        case 'energy':
          this.$router.push({ path: '/pages/energy/energy_manage/main' })
          break
        case 'meeting':
          this.$router.push({ path: '/pages/meeting/meeting_order_overview/main' })
          break
        default:
      }
    }
  }
}
</script>

<style lang="css">
  @import './home.css';
</style>
